The directional control valve capable of detecting the changeover operation of a spool utilizing a magnet is well known as disclosed in, for example, Japanese Unexamined Utility Model Publication No. 2-66784. This known directional control valve is provided with a magnet on the outer periphery of a spool and provided with a magnet sensor on a casing. This directional control valve is constituted so that, when the spool moves to one changeover position, the magnet approaches the magnetic sensor, and the magnetic sensor is turned on, and that, when the spool moves to the other changeover position, the magnet moves away from the magnetic sensor, and the magnetic sensor is turned off. This directional control valve is thus adapted to detect that the spool has been changed over by the on/off of the magnetic sensor.
However, since the above-described conventional directional control valve installs the magnet at a position situated in a fluid passage on the outer periphery of the spool, the magnet directly contacts the hydraulic fluid. Therefore, when the fluid contains water, chemical mist, particulates of magnetic material such as metallic powder, or the like, there has often arisen the problem that the contact of the magnet with these substances makes the magnet rust, corrode, or adsorb the particulates, thereby causing the reduction in detection accuracy due to the decrease in magnetic force, or incurring poor sliding conditions.
Furthermore, since the above-described conventional directional control valve uses the method in which the changeover of the spool is detected by the turning on/off of the magnetic sensor, any position on the way of a stroke can not be known, even if that the spool has reached each of the two stroke ends can be known. It is, therefore, substantially impossible to know whether the spool has normally operated during the whole stroke and reached a stroke end or not. This has created a problem in the reliability or the maintenance in executing automatization.